package io.jsen.meta.diff.obj;

import io.jsen.meta.diff.field.MetaField;
import lombok.Data;

/**
 * 保存当前字段定义
 * <p>
 * 保存diff的时候关联的对应meta对象
 *
 * @author jsen
 * @date 2021/4/6
 */
@Data
@SuppressWarnings("rawtypes")
public class MetaRelation {
    /**
     * diff 对应的meta
     */
    private MetaObject relation;
    private MetaObject<?, ?> parent;
    /**
     * 字段定义
     */
    private MetaField metaField;

    public MetaRelation(MetaField metaField) {
        this.metaField = metaField;
    }

    @Override
    public String toString() {
        return metaField.toString();
    }
}
